load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "multiregion",
    srcs = [
        "region_config.go",
        "region_util.go",
        "telemetry.go",
        "validate_table.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/sql/catalog/multiregion",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/config/zonepb",
        "//pkg/sql/catalog",
        "//pkg/sql/catalog/catpb",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/pgwire/pgcode",
        "//pkg/sql/pgwire/pgerror",
        "//pkg/sql/sem/builtins/builtinconstants",
        "//pkg/sql/sem/eval",
        "//pkg/sql/sem/tree",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_lib_pq//oid",
    ],
)

go_test(
    name = "multiregion_test",
    srcs = ["region_config_test.go"],
    deps = [
        ":multiregion",
        "//pkg/config/zonepb",
        "//pkg/sql/catalog/catpb",
        "//pkg/sql/catalog/descpb",
        "//pkg/testutils",
        "//pkg/util/leaktest",
        "@com_github_stretchr_testify//require",
        "@org_golang_google_protobuf//proto",
    ],
)
